package cn.demo.d02;

import java.util.List;

public class StudentUtil {
    public static int getMaxAgeStudent(List<Student> list){
        int max = list.get(0).getAge();
        for (int i = 1; i < list.size(); i++) {
            int tempAge = list.get(i).getAge();
            if(max<tempAge){
                max = tempAge;
            }
        }
        return max;
    }
}
